Combat
Brogue uses a simple combat model. First it uses the attacker's accuracy and the defender's defense to determine whether the attacker hits the defender at all. If it does hit, then it rolls the damage done by the attacker; this roll is based'' exclusively on the attacker's instrinsic or wielded damage stat. Chance to Hit The chance to hit is calculated as: hitProbability = accuracy * 0.987 ^ defense; If hitProbability is more than 100%, the hit will always land. So long as accuracy is more than 0, though, no amount of defense can guarantee that no hits will ever land. Targets that are unaware, stuck, paralyzed, etc. will always be hit. Accuracy Players have a base accuracy value of 100. Each marginal point of weapon enchantment multiplies your accuracy by 1.065. The player's accuracy is thus: accuracy = 100 * 1.065^(weapon net enchant) Armor The player's defense value is the defense value of the equipped armor. The amount displayed in game is 10% of the actual value. The chance of a monster to hit you is chance to hit = (monster accuracy) * .987^(defense value in game * 10) A rule of thumb is that for every 5.2 points of armor, monsters' chance to hit you is halved. Weakness For the player, the effect of weakness is more severe when the resulting strength falls below the strength required to wield or wear equipment. Above that threshold, there is an effective penalty of -.25 enchantment levels per level of weakness; below it, there is an effective penalty of -2.5 enchantment levels. For monsters, the effect of weakness is much simpler: There is always an effective penalty of -2.5 enchantment levels per point of weakness. It is as if monsters were all just strong enough to use their intrinsic equipment. Damage Damage is expressed as a ''range ''and a ''clumping factor. ''Damage never falls below the minimum or exceeds the maximum of the range, and the average damage is always the average of the two. The clumping factor controls how central the distribution is: a higher clumping factor produces more values that are close to the average damage. From the source code: ''If the range is 0-10 with a clumping factor of 1, it's a uniform distribution. With a clumping factor of 2, it's calculated as 2d5 (with d5 meaning a die numbered from 0 through 5). With 3, it's 3d3, and so on. For the player, each point of weapon enchantment multiplies damage by 1.065. Special Properties Revenants are immune to physical damage as calculated here, but weapon runics still affect them. Acid mounds and acidic jellies only degrade your weapon if you actually hit them, and they (along with acid turrets) only degrade your armor if they actually hit you. Examples This table gives the effective enchantment level (the weapon's natural enchantment level plus the bonus/penalty from strength) required achieve a certain to hit chance against some typically dangerous monsters. This table gives the amount of armor, as displayed in the sidebar, required to reduce a monster's chance to hit to a certain value. An armor value of 11.5 means that the sidebar displays 11 armor and you have a strength bonus of +0.5 (or +1.5, or +2.5, etc.). Category:Mechanics